﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Spectrum
{
    /// <summary>
    /// 人工波生成参数
    /// </summary>
    public static class ArtiWaveParam
    {
        /// <summary>
        /// 反应不超过反应谱值的概率
        /// </summary>
        public static double P = 0.85;

        /// <summary>
        /// 衰减系数 通常取值范围为0.1至1.0
        /// </summary>
        public static double c = 0.15;

        /// <summary>
        /// 线程数目
        /// </summary>
        public static int ThreadNumber = 6;

        /// <summary>
        /// 6s后反应谱是否拉平
        /// </summary>
        public static bool is6GBHorizontal = false;

        /// <summary>
        /// 反应谱类型
        /// </summary>
        public static CodeSpectrumEnum CodeSpectrumType = CodeSpectrumEnum.GB2015;

        /// <summary>
        /// 周期长度
        /// </summary>
        public static int PeriodLength = 6;

        /// <summary>
        /// 周期增量
        /// </summary>
        public static double PeriodDelta = 0.01;

        /// <summary>
        /// 特征周期
        /// 与人工波迭代修正相关
        /// </summary>
        public static double Tg = 0.35;

        /// <summary>
        /// 影响系数最大值
        /// 近用于生成目标反应谱
        /// </summary>
        public static double AfaMax = 0.08;

        /// <summary>
        /// 场地土类别
        /// I II III IV
        /// </summary>
        public static string SoilCondition = "II";

        /// <summary>
        /// 阻尼比
        /// </summary>
        public static double DampRatio = 0.05;

        /// <summary>
        /// 进行频谱调整的容差
        /// </summary>
        public static double ModifiedTol = 0.1F;

        /// <summary>
        /// 谐波贡献率
        /// </summary>
        public static double ContributionTol = 0.1F;

        /// <summary>
        /// 相位调整的频率
        /// </summary>
        public static int ThetaModifiedIntervalTime = 1;

        /// <summary>
        /// 迭代组合总次数
        /// </summary>
        public static int IterationGroupNum = 6;

        /// <summary>
        /// 修改幅值谱的周期增量
        /// 创建高斯平稳过程同时使用
        /// </summary>
        public static double ModifiedPeriodDelta = 0.02;

        /// <summary>
        /// 生成高斯平稳过程的dw值
        /// </summary>
        public static double DeltaPeriodCreateGaussian = 1;

        /// <summary>
        /// 确定Dw最小值
        /// </summary>
        public static int MinDwFactor = 1;

        /// <summary>
        /// 短周期范围内的贡献率调整
        /// </summary>
        public static double ShortPeriodContributionModified = 1;

        /// <summary>
        /// 重力加速度修正系数
        /// </summary>
        public static double SpecturmModifiedFactor = 1;

        /// <summary>
        /// 反应谱求解时积分步长需小于周期的1/SpectrumDtMax倍
        /// </summary>
        public static int SpectrumDtMax = 50;
    }
}
